<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>WS-I Service Contract Generator</title>
        
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>        
<script type="text/javascript"> 
\$(document).ready(function() {	
	\$('#serviceInteractionType').change(function() {
		\$('#generateInitiatorXsd').attr("disabled", \$(this).val() != "Bidirectional")
	}).change();
});
</script> 
         
    </head>
    <body>
    	<div><img alt="" src="/images/top.png" /></div>   
        <h1>AZ Service contract skeleton generator</h1>        
        <p><em>All fields are mandatory. Use buttons bellow to generate complete WSDL and skeleton service schemas. Artifacts adhere to Doc Lit Wrapped and w3c versioning startegy no 2.5.</em></p>
        <p><em>There is also a button for downloading a zip file of all artifacts.</em></p>
        <form action="/az" method="post">
        	<table><tr><td>
            <table>
                <tr><td>Service name:</td><td><input name="name" id="name" type="text" value="${request.getAttribute("name")}" size="50" /></td></tr>
                <tr><td>Description:</td><td><input size="68" name="description" id="description" value="${request.getAttribute("description")}" type="text" /></td></tr>
                <tr><td>Architecture domain:</td><td><input name="architectureDomain" id="architectureDomain" value="${request.getAttribute("architectureDomain")}" type="text" /></td></tr>
                <tr><td>Business context:</td><td><input name="domain" id="domain" value="${request.getAttribute("domain")}" type="text" /></td></tr>
                <tr><td>Domain:</td><td><input name="subDomain" id="subDomain" type="text" value="${request.getAttribute("subDomain")}" /></td></tr>
                <tr><td>Major version:</td><td><input name="majorVersion" id="majorVersion" type="text" value="${request.getAttribute("majorVersion")}" size="2" /></td></tr>
                <tr><td>Minor version:</td><td><input name="minorVersion" id="minorVersion" type="text" value="${request.getAttribute("minorVersion")}" size="2" /></td></tr>
                <tr><td>Service interaction type:</td><td>
                		<% def siType = request.getAttribute("serviceInteractionType") %>
                        <select name="serviceInteractionType" id="serviceInteractionType">
                            <option value="Request-Response" "${siType == 'Request-Response' ? 'selected="selected"' : ''}">Request-Response</option>
                            <option value="One-Way" "${siType == 'One-Way' ? 'selected="selected"' : ''}">One-Way</option>
                            <option value="Bidirectional" "${siType == 'Bidirectional' ? 'selected="selected"' : ''}">Bidirectional</option>
                </select>
                <input type="submit" value="Show Diagram" name="generate" id="showDiagram"></input></td><td></td></tr>

                <tr><td>Profile:</td><td> 
                <select name="profile" id="profile"> 
                    <option value="AZWS10">Base profile</option>
                </select>
                </td></tr>
            </table></td>
            <td><% if (request.getAttribute("umlImageUrl") != null) { %> <div><img alt="" src='${request.getAttribute("umlImageUrl")}' /></div> <% } %></td>
            </tr></table>
            <p />
            <div>
            <input type="submit" value="Generate complete WSDL" name="generate" id="generateWsdl"></input>
            <input type="submit" value="Generate Responder Schema skeleton" name="generate" id="generateResponderXsd"></input>
            <input type="submit" value="Generate Initiator Schema skeleton" name="generate" id="generateInitiatorXsd"></input>
            <input type="submit" value="Generate zip" name="generate" id="generateZip"></input>
            </div>
            <p /><p /><p />
            <p><em>Provided without any warranties by <a href="http://www.callistaenterprise.se" >Callista Enterprise AB</a>.</em></p>
        </form>
        <p />
       <div><img alt="" src="/images/bottom.png"/></div>
    </body>
</html>